package cn.dnui_lxx432.dnuifood_16110100432.service;

import java.util.List;

import cn.dnui_lxx432.dnuifood_16110100432.JavaBean.ResultBean;
import cn.dnui_lxx432.dnuifood_16110100432.JavaBean.comments;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

import cn.dnui_lxx432.dnuifood_16110100432.JavaBean.UserBean;

public interface UserService {
    @GET("userLogin.do")
    Call<UserBean> doLogin(@Query("username") String username,
                           @Query("userpass") String userpass);

    @GET("userRegister.do ")
    Call<ResultBean> doRegister(@Query("username") String username,
                                @Query("userpass") String userpass,
                                @Query("mobilenum") String mobilenum ,
                                @Query("address") String address,
                                @Query("comment") String comment
    );

    @GET("getUserById.do")
    Call<UserBean>  getUserById(
            @Query("user_id") String user_id
    );

    @GET("updateUserById.do")
    Call<ResultBean> updateUserById(
            @Query("user_id")String user_id,
            @Query("username")String username,
            @Query("userpass")String userpass,
            @Query("mobilenum")String mobilenum,
            @Query("address")String address
    );

    @GET("getAllOrdersByUser.do")
    Call<List<comments>> getAllOrdersByUser(
            @Query("user_id") String user_id
    );

    @GET("getAllCommentsByUser.do")
    Call<List<comments>> getAllCommentsByUser(
            @Query("user_id") String user_id
    );


}
